In the "JS DOM programming Art", with return false to prevent the default behavior of the event, but JS Elevation 3 does not have this usage, then what is this?Let's take a look at an explanation.On this issue, the first two points to be corrected:1.
1. Common code, registering an event method on a DOM node$ ("#btnResponse"). Click (Login); $ ("#txtCode"). KeyDown (Returnkey);2. Very normal login function, just inside with the Swal pluginCode execution effect is what I want, click Btnresponse,
Var oProgressLayer = null;/*************************************** **************************************** *****************// Set all elements on the Web page to events that are not responsive, and set the mouse cursor to wait**********************
Original source: http://blog.csdn.net/cjz_huateng/article/details/9622533/** Shielding F1 Help */Window.onhelp = function () {return false;}/*** Shielded F5, CTRL + N, SHIFT+F10, ALT+F4* If you want to block other keys, find the corresponding
This article will introduce the blocked applications in js. You can select, cut, copy, and screen blocking content on webpages. In short, you can imagine all of them. For more information, see, I hope this will help you learn about js blocking.
This article introduces the application of the shielding in the next JS; screen content selected, cut, copied and screen in short, you can imagine that there should be, interested friends can refer to, I hope to learn more about JS help
JS
JS Shielding effect
Copy Code code as follows:
/** Shielding F1 Help * *
Window.onhelp = function () {return false;}
/**
* Shielding F5, CTRL + N, SHIFT+F10, ALT+F4
* If you want to block other keys, then find the corresponding
At the same time suitable for IE, Firefox, Google browser to apply, after the filter code is as follows:
Copy Code code as follows:
Disable right key, text selection, copy key
$ (document). Bind ("ContextMenu", function () {return
The previously written method has a defect. You can enter a space. Now, spaces are blocked. The space filtering function is added to the previous code. The Code is as follows:
The Code is as follows:
$ ("# Money"). bind ("propertychange",
This article mainly introduces how JavaScript and JQuery shield webpage right-click menu and prohibit copy selection, for more information, see. I remember that when I first came into contact with dynamic HTML and JavaScript, I got in touch with the
This article describes the jquery disable right-click, text selection function, the implementation of the Copy button can be compatible browser has IE, Firefox, Google Browser, you can refer to friends. IE browser refers to IE as the core browser is
The Code is as follows:Copy codeThe Code is as follows:$ ("# Money"). bind ("propertychange", function (){If (""! = This. value ){Var str = this. value. replace (/(^ \ s *) | (\ s * $)/g ,"");If (this. value! = Str)This. value = str;}If (isNaN
JS prohibits selecting text, copying text code
IE has onselectstart this method by setting this method to prevent element text from being selected. Firefox does not have this method, but it can be done through a CSS tutorial or a workaround:
if
IE has onselectstart this method, by setting this method can prohibit the element text is selected. Firefox does not have this method, but can be resolved through CSS or a workaround:if (typeof (Element.onselectstart)! = "undefined") { Forbidden
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.